package com.yidu.KuangJia.service.impl;

import com.yidu.KuangJia.entity.Righty;
import com.yidu.KuangJia.mapper.RightMapper;
import com.yidu.KuangJia.service.RightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class RightServiceImpl implements RightService {

    @Autowired
    RightMapper rightMapper;

    @Override
    public List<Righty> selectRighty() {
        List<Righty> rightMapperList = rightMapper.selectRighty();
        return rightMapperList;
    }

    @Override
    public List<Righty> selectRightyFu(String userName, String userPwd, String rightCode) {
        Map map = new HashMap();
        map.put("userName",userName);
        map.put("userPwd",userPwd);
        map.put("rightCode",rightCode);
        List<Righty> righties = rightMapper.selectRightyFu(map);
        return righties;
    }

    @Override
    public List<Righty> selectRightyZi(String rightCode) {
        List<Righty> righties = rightMapper.selectRightyZi(rightCode);
        return righties;
    }
}
